package com.example.order;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class OrderController {
    @Resource
    private OrderRepository orderRepository;

    @GetMapping("/order")
    public List<Order> list() {
        return orderRepository.findAll();
    }
}
